import request from '@/utils/request'

// 分页查询地址信息
export function addressPage(data) {
  return request({
    url: '/sys/user/address/page',
    method: 'post',
    data: data
  })
}

// 设置默认地址
export function addressDefault(data) {
  return request({
    url: '/sys/user/address/default',
    method: 'post',
    data: data
  })
}


// 添加地址信息
export function addressAdd(data) {
  return request({
    url: '/sys/user/address/add',
    method: 'post',
    data: data
  })
}
// 获取国际电话区号
export function getInternationalTelephoneAreaCode() {
  return request({
    url: '/sys/app/user/getInternationalTelephoneAreaCode',
    method: 'get'
  })
}
// 获取地区列表
export function shopAddress(data) {
  return request({
    url: '/web/shop/address',
    method: 'post',
    data: data
  })
}
//修改地址信息
export function addressEdit(data) {
  return request({
    url: '/sys/user/address/edit',
    method: 'put',
    data: data
  })
}


// 删除地址信息
export function addressDel(id) {
  return request({
    url: `/sys/user/address/${id}`,
    method: 'delete'
  })
}

